package org.example.utils;

import org.example.model.Browser;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebDriver;

public class BrowserUtils {

    public static Browser initBrowser(WebDriver webDriver) {
        Browser browser = new Browser();
        Point position = webDriver.manage().window().getPosition();
        browser.setPointX(position.getX());
        browser.setPointY(position.getY());
        Dimension dimension = webDriver.manage().window().getSize();
        browser.setWidth(dimension.getWidth());
        return browser;
    }
}
